<template>
    <div>
        <div class="layout-content-breadcrumb">
            <Breadcrumb>
                <Breadcrumb-item>投诉管理</Breadcrumb-item>
                <Breadcrumb-item>投诉分类</Breadcrumb-item>
            </Breadcrumb>
        </div>
        <div class="page-content">
            <Table :columns="columns" :data="dataSource"></Table>
        </div>
    </div>
</template>
<style lang="less">

</style>
<script>
    import api from 'service/complaint'
    export default{
        data(){
            return {
                columns: [
                    {
                        title: '分类名',
                        key: 'name'
                    },
                    {
                        title: '数量',
                        key: 'count'
                    }
                ],
                dataSource: []
            }
        },
        mounted(){
            this.getList()
        },
        methods:{
            getList(){
                api.getComplaintCategory({need_count:'1'})
                    .then(({data})=>{
                    this.dataSource=data||[]
                    })
            }
        }
    }
</script>
